package na.learn.java.smalltests;

import java.util.ArrayList;

public class TestArrayType {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		A a, b;

		/*A[] arr = { a = new A(), b = new A() };*/
		
		ArrayList list = new ArrayList();
		list.add(new A());
		list.add(new B());
		System.gc();
		/*A[] ab = {new A()};
		A[] orgObjArr = (A[])list.toArray( ab );*/
//		A[] objArr = (A[])list.toArray();
		/*Object[] objArr = list.toArray();
		objArr[1]= null;*/
		for(int counter =0; counter < list.size(); counter++){
			System.out.println((A)list.get(counter));
			
		}
		
		for(int counter =0; counter < 1000000; counter++){
			A bc = new A();
			
		}
		
		
		/*

		for(int counter =0; counter < list.size(); counter++){
			System.out.println((A)objArr[counter]);
			
		}*/
		
		
		/*objArr[1]= null;
		
		if (objArr != null) {
			if (objArr[0] instanceof A)
				System.out.println("Yes.");
			else
				System.out.println("No");

		}*/

	}

}
